home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / misc / volume8 / libhoward / part08 < prev    next >
Encoding:
Text File  |  1989-09-30  |  48.0 KB  |  1,762 lines

  1. Newsgroups: comp.sources.misc
  2. subject: v08i086: libhoward portability library, part 8 of 9
  3. from: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
  4. Reply-To: howard@dahlbeck.ericsson.se (Howard Gayle)
  5.  
  6. Posting-number: Volume 8, Issue 86
  7. Submitted-by: howard@dahlbeck.ericsson.se (Howard Gayle)
  8. Archive-name: libhoward/part08
  9.  
  10. #! /bin/sh
  11. # This is a shell archive.  Remove anything before this line, then feed it
  12. # into a shell via "sh file" or similar.  To overwrite existing files,
  13. # type "sh file -c".
  14. # The tool that generated this appeared in the comp.sources.unix newsgroup;
  15. # send mail to comp-sources-unix@uunet.uu.net if you want that tool.
  16. # If this archive is complete, you will see the following message at the end:
  17. #        "End of archive 8 (of 9)."
  18. # Contents:  MakeCommon cat-path.1 cia.1 cia.b copy-self.b freeze.1
  19. #   gold-lt.tex lnR.1 lnR0.b malf.h mcpstr.3 memcmp.c mfclose.c
  20. #   mfopen.c mkFreeze.b new-1.b new-3.b new-MakeC.b smpdtl.c strend.3
  21. #   strend.c usage.3 usage.c userfn.3
  22. # Wrapped by howard@hasse on Mon Sep 25 07:08:15 1989
  23. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  24. if test -f 'MakeCommon' -a "${1}" != "-c" ; then 
  25.   echo shar: Will not clobber existing file \"'MakeCommon'\"
  26. else
  27. echo shar: Extracting \"'MakeCommon'\" \(1412 characters\)
  28. sed "s/^X//" >'MakeCommon' <<'END_OF_FILE'
  29. X# MakeCommon - common definitions for uMakefile and Makefile for howard
  30. X#
  31. X# $Header: MakeCommon,v 1.3 89/09/22 13:46:45 howard Exp $
  32. X#
  33. X# Copyright 1989 Howard Lee Gayle
  34. X# This file is written in the ISO 8859/1 character set.
  35. X#
  36. X# This program is free software; you can redistribute it and/or modify
  37. X# it under the terms of the GNU General Public License version 1,
  38. X# as published by the Free Software Foundation.
  39. X#
  40. X# This program is distributed in the hope that it will be useful,
  41. X# but WITHOUT ANY WARRANTY; without even the implied warranty of
  42. X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  43. X# GNU General Public License for more details.
  44. X#
  45. X# You should have received a copy of the GNU General Public License
  46. X# along with this program; if not, write to the Free Software
  47. X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  48. X
  49. X# Commands:
  50. X
  51. X# Change mode of a file.
  52. XCHMOD=chmod
  53. X
  54. X# Get a file from the distribution directory.
  55. XDISTI=mkDistI
  56. X
  57. X# Write arguments on stdout.
  58. XECHO=echo
  59. X
  60. X# Remove a file.
  61. XRM=zap -f
  62. X
  63. X# Perform set difference operations.
  64. XSETS=sets
  65. X
  66. X# Uncompress if necessary and check out from RCS or SCCS.
  67. XUNCMPRS=mkUncmprs
  68. X
  69. X
  70. X# C include file search path.
  71. XINCLUDES=-I/usr/local/local-include -I/usr/local/free/howard/1/include
  72. X
  73. X# Special C programs.  These are *not* library functions.
  74. XSCS = mk-smp.c
  75. X
  76. X# Generated C include files.
  77. Xit = cc-lims.i libc-lims.i registers.i simultipre.i
  78. END_OF_FILE
  79. if test 1412 -ne `wc -c <'MakeCommon'`; then
  80.     echo shar: \"'MakeCommon'\" unpacked with wrong size!
  81. fi
  82. # end of 'MakeCommon'
  83. fi
  84. if test -f 'cat-path.1' -a "${1}" != "-c" ; then 
  85.   echo shar: Will not clobber existing file \"'cat-path.1'\"
  86. else
  87. echo shar: Extracting \"'cat-path.1'\" \(1437 characters\)
  88. sed "s/^X//" >'cat-path.1' <<'END_OF_FILE'
  89. X.\" $Header: cat-path.1,v 1.1 89/09/21 10:52:02 howard Exp $
  90. X.TH CAT-PATH 1 "$Revision: 1.1 $"
  91. X.SH NAME
  92. Xcat-path \- search path for files and concatenate them
  93. X.SH SYNOPSIS
  94. X.B cat-path
  95. X.I path
  96. X.I filename \&.\|.\|.
  97. X.SH COPYRIGHT
  98. XCopyright \(co 1989 Howard Lee Gayle
  99. X.SH DESCRIPTION
  100. X.I cat-path
  101. Xsearches
  102. X.IR path ,
  103. Xa colon-separated list of directories,
  104. Xfor each given file, then copies it to standard output.
  105. XDirectory names in
  106. X.I path
  107. Xmust
  108. X.I not
  109. Xend with /.
  110. X.SH EXAMPLE
  111. XSearch for an include file:
  112. X.nf
  113. X   % cat-path /usr/include:/usr/local/include limits.h
  114. X.fi
  115. X.SH BUGS
  116. XShould be more relaxed about directory name syntax.
  117. X.SH LICENSE
  118. XThis program is free software; you can redistribute it and/or modify
  119. Xit under the terms of the GNU General Public License version 1,
  120. Xas published by the Free Software Foundation.
  121. X.PP
  122. XThis program is distributed in the hope that it will be useful,
  123. Xbut WITHOUT ANY WARRANTY; without even the implied warranty of
  124. XMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  125. XGNU General Public License for more details.
  126. X.PP
  127. XYou should have received a copy of the GNU General Public License
  128. Xalong with this program; if not, write to the Free Software
  129. XFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  130. X.SH AUTHOR
  131. XHoward Gayle,
  132. XTN/ETX/T/BG,
  133. XEricsson Telecom AB,
  134. XS-126 25 Stockholm,
  135. XSweden,
  136. Xhoward@ericsson.se,
  137. Xuunet!ericsson.se!howard,
  138. XPhone: +46 8 719 5565,
  139. XFAX: +46 8 719 9598,
  140. XTelex: 14910 ERIC S
  141. END_OF_FILE
  142. if test 1437 -ne `wc -c <'cat-path.1'`; then
  143.     echo shar: \"'cat-path.1'\" unpacked with wrong size!
  144. fi
  145. # end of 'cat-path.1'
  146. fi
  147. if test -f 'cia.1' -a "${1}" != "-c" ; then 
  148.   echo shar: Will not clobber existing file \"'cia.1'\"
  149. else
  150. echo shar: Extracting \"'cia.1'\" \(1455 characters\)
  151. sed "s/^X//" >'cia.1' <<'END_OF_FILE'
  152. X.\" $Header: cia.1,v 1.1 89/09/23 14:11:22 howard Exp $
  153. X.TH CIA 1 "$Revision: 1.1 $"
  154. X.SH NAME
  155. Xcia \- check files into RCS with strict locking
  156. X.SH SYNOPSIS
  157. X.B cia
  158. X.RB [ " \-u " ] 
  159. X.I filename \&.\|.\|.
  160. X.SH COPYRIGHT
  161. XCopyright \(co 1989 Howard Lee Gayle
  162. X.SH DESCRIPTION
  163. X.I cia
  164. Xchecks the given files into RCS files in an RCS subdirectory,
  165. Xand turns on strict locking.
  166. XThe
  167. X.B \-u
  168. Xoption causes it to check out the files again.
  169. X.SH EXAMPLE
  170. X.nf
  171. X   % cia foo.c foo.1
  172. X.fi
  173. X.SH FILES
  174. X.DT
  175. X.nf
  176. XRCS/*,v \- RCS files
  177. X.fi
  178. X.SH "SEE ALSO"
  179. X.IR ci (1),
  180. X.IR kgb (0).
  181. X.SH BUGS
  182. XA
  183. X.B \-l
  184. Xoption to do co\ \-l would be nice.
  185. X.SH ETYMOLOGY
  186. XCheck in all, of course.
  187. X.SH LICENSE
  188. XThis program is free software; you can redistribute it and/or modify
  189. Xit under the terms of the GNU General Public License version 1,
  190. Xas published by the Free Software Foundation.
  191. X.PP
  192. XThis program is distributed in the hope that it will be useful,
  193. Xbut WITHOUT ANY WARRANTY; without even the implied warranty of
  194. XMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  195. XGNU General Public License for more details.
  196. X.PP
  197. XYou should have received a copy of the GNU General Public License
  198. Xalong with this program; if not, write to the Free Software
  199. XFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  200. X.SH AUTHOR
  201. XHoward Gayle,
  202. XTN/ETX/T/BG,
  203. XEricsson Telecom AB,
  204. XS-126 25 Stockholm,
  205. XSweden,
  206. Xhoward@ericsson.se,
  207. Xuunet!ericsson.se!howard,
  208. XPhone: +46 8 719 5565,
  209. XFAX: +46 8 719 9598,
  210. XTelex: 14910 ERIC S
  211. END_OF_FILE
  212. if test 1455 -ne `wc -c <'cia.1'`; then
  213.     echo shar: \"'cia.1'\" unpacked with wrong size!
  214. fi
  215. # end of 'cia.1'
  216. fi
  217. if test -f 'cia.b' -a "${1}" != "-c" ; then 
  218.   echo shar: Will not clobber existing file \"'cia.b'\"
  219. else
  220. echo shar: Extracting \"'cia.b'\" \(1488 characters\)
  221. sed "s/^X//" >'cia.b' <<'END_OF_FILE'
  222. X  
  223. X# cia - Check in arguments to RCS
  224. X#
  225. X# $Header: cia.b,v 1.3 89/09/23 14:06:03 howard Exp $
  226. X#
  227. X# Copyright 1989 Howard Lee Gayle
  228. X# This file is written in the ISO 8859/1 character set.
  229. X#
  230. X# This program is free software; you can redistribute it and/or modify
  231. X# it under the terms of the GNU General Public License version 1,
  232. X# as published by the Free Software Foundation.
  233. X#
  234. X# This program is distributed in the hope that it will be useful,
  235. X# but WITHOUT ANY WARRANTY; without even the implied warranty of
  236. X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  237. X# GNU General Public License for more details.
  238. X#
  239. X# You should have received a copy of the GNU General Public License
  240. X# along with this program; if not, write to the Free Software
  241. X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  242. X#
  243. X# Shell variables:
  244. X# c - flag to check out again
  245. X# f - steps through files
  246. X# r - RCS file
  247. X# u - usage string
  248. X
  249. XCMDNAME=cia
  250. Xexport CMDNAME
  251. Xu="Usage: $CMDNAME [-u] file..."
  252. Xif [ "x$1" = x-u ]
  253. Xthen
  254. X   c=1
  255. X   shift
  256. Xfi
  257. Xif [ $# -eq 0 ]
  258. Xthen
  259. X   echo "$u" 1>&2
  260. X   exit 1
  261. Xfi
  262. Xif [ ! -d RCS ]
  263. Xthen
  264. X   echo "$CMDNAME: no RCS directory" 1>&2
  265. X   exit 1
  266. Xfi
  267. Xfor f
  268. Xdo
  269. X   if [ -r "$f" ]
  270. X   then
  271. X      r="RCS/$f,v"
  272. X      if [ -f "$r" ]
  273. X      then
  274. X         echo "$CMDNAME: $r: RCS file already exists" 1>&2
  275. X      else
  276. X         ci "$f" "$r" && rcs -L "$r"
  277. X         if [ $c ]
  278. X         then
  279. X            co "$f"
  280. X         fi
  281. X      fi
  282. X   else
  283. X      echo "$CMDNAME: $f: file not readable" 1>&2
  284. X   fi
  285. Xdone
  286. X
  287. END_OF_FILE
  288. if test 1488 -ne `wc -c <'cia.b'`; then
  289.     echo shar: \"'cia.b'\" unpacked with wrong size!
  290. fi
  291. # end of 'cia.b'
  292. fi
  293. if test -f 'copy-self.b' -a "${1}" != "-c" ; then 
  294.   echo shar: Will not clobber existing file \"'copy-self.b'\"
  295. else
  296. echo shar: Extracting \"'copy-self.b'\" \(1500 characters\)
  297. sed "s/^X//" >'copy-self.b' <<'END_OF_FILE'
  298. X  
  299. X# copy-self - break link
  300. X#
  301. X# $Header: copy-self.b,v 1.5 89/09/21 07:18:17 howard Exp $
  302. X#
  303. X# Copyright 1989 Howard Lee Gayle
  304. X# This file is written in the ISO 8859/1 character set.
  305. X#
  306. X# This program is free software; you can redistribute it and/or modify
  307. X# it under the terms of the GNU General Public License version 1,
  308. X# as published by the Free Software Foundation.
  309. X#
  310. X# This program is distributed in the hope that it will be useful,
  311. X# but WITHOUT ANY WARRANTY; without even the implied warranty of
  312. X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  313. X# GNU General Public License for more details.
  314. X#
  315. X# You should have received a copy of the GNU General Public License
  316. X# along with this program; if not, write to the Free Software
  317. X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  318. X#
  319. X# Shell variables:
  320. X# d - directory in which file resides
  321. X# g - directory is group-writeable
  322. X# f - step through file names
  323. X# t - temporary file name
  324. X# u - usage string
  325. X
  326. XCMDNAME=copy-self
  327. Xexport CMDNAME
  328. Xu="Usage: $CMDNAME [-r] file..."
  329. Xif [ $# -eq 0 ]
  330. Xthen
  331. X   echo "$u" 1>&2
  332. X   exit 1
  333. Xfi
  334. Xif [ "x$1" = x-r ]
  335. Xthen
  336. X   shift
  337. X   for f
  338. X   do
  339. X     d=`dirname "$f"`
  340. X     t="$d"/.copy-self$$
  341. X     cp "$f" $t && mv -f $t "$f"
  342. X   done
  343. Xelse
  344. X   for f
  345. X   do
  346. X     d=`dirname "$f"`
  347. X     t="$d"/.copy-self$$
  348. X     g=`ls -ld "$d" | grep '^d....w'`
  349. X     if [ "$g" ]
  350. X     then
  351. X        cp "$f" $t && mv -f $t "$f" && chmod ug+w "$f"
  352. X     else
  353. X        cp "$f" $t && mv -f $t "$f" && chmod u+w  "$f"
  354. X     fi
  355. X   done
  356. Xfi
  357. END_OF_FILE
  358. if test 1500 -ne `wc -c <'copy-self.b'`; then
  359.     echo shar: \"'copy-self.b'\" unpacked with wrong size!
  360. fi
  361. # end of 'copy-self.b'
  362. fi
  363. if test -f 'freeze.1' -a "${1}" != "-c" ; then 
  364.   echo shar: Will not clobber existing file \"'freeze.1'\"
  365. else
  366. echo shar: Extracting \"'freeze.1'\" \(1861 characters\)
  367. sed "s/^X//" >'freeze.1' <<'END_OF_FILE'
  368. X.\" $Header: freeze.1,v 1.1 89/09/23 14:22:28 howard Exp $
  369. X.TH FREEZE 1 "$Revision: 1.1 $"
  370. X.SH NAME
  371. Xfreeze \- record latest revisions of all RCS files in directory
  372. X.SH SYNOPSIS
  373. X.B freeze
  374. X.BI [\-r revision ] 
  375. X.SH COPYRIGHT
  376. XCopyright \(co 1989 Howard Lee Gayle
  377. X.SH DESCRIPTION
  378. X.I freeze
  379. XRecords the names, latest revisions, and latest modification
  380. Xtimes of the RCS files in the RCS subdirectory.
  381. XIt records them in an RCS file named FREEZE.
  382. X(To keep Bertrand Russell happy, information about FREEZE is
  383. X.I not
  384. Xrecorded.)
  385. XFREEZE is created if necessary.
  386. XIf the
  387. X.B \-r
  388. Xoption is present, the given revision is passed to
  389. X.IR ci (1)
  390. Xwhen checking in FREEZE.
  391. X.SH EXAMPLE
  392. XFreezing the first internal release after external release 2:
  393. X.nf
  394. X   % freeze -r3
  395. X.fi
  396. X.SH FILES
  397. X.DT
  398. X.nf
  399. XRCS/*,v \- RCS file
  400. X.fi
  401. X.SH "SEE ALSO"
  402. X.IR rcs (1),
  403. X.IR freezePch (1).
  404. X.SH "IN FUTURE"
  405. XIt would be useful to have a command to check out the revision
  406. Xof every file in a given FREEZE file.
  407. XFor instance, if a bug report comes in about revision 2.7, it
  408. Xwould be easy to recreate it.
  409. X.SH LICENSE
  410. XThis program is free software; you can redistribute it and/or modify
  411. Xit under the terms of the GNU General Public License version 1,
  412. Xas published by the Free Software Foundation.
  413. X.PP
  414. XThis program is distributed in the hope that it will be useful,
  415. Xbut WITHOUT ANY WARRANTY; without even the implied warranty of
  416. XMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  417. XGNU General Public License for more details.
  418. X.PP
  419. XYou should have received a copy of the GNU General Public License
  420. Xalong with this program; if not, write to the Free Software
  421. XFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  422. X.SH AUTHOR
  423. XHoward Gayle,
  424. XTN/ETX/T/BG,
  425. XEricsson Telecom AB,
  426. XS-126 25 Stockholm,
  427. XSweden,
  428. Xhoward@ericsson.se,
  429. Xuunet!ericsson.se!howard,
  430. XPhone: +46 8 719 5565,
  431. XFAX: +46 8 719 9598,
  432. XTelex: 14910 ERIC S
  433. END_OF_FILE
  434. if test 1861 -ne `wc -c <'freeze.1'`; then
  435.     echo shar: \"'freeze.1'\" unpacked with wrong size!
  436. fi
  437. # end of 'freeze.1'
  438. fi
  439. if test -f 'gold-lt.tex' -a "${1}" != "-c" ; then 
  440.   echo shar: Will not clobber existing file \"'gold-lt.tex'\"
  441. else
  442. echo shar: Extracting \"'gold-lt.tex'\" \(1887 characters\)
  443. sed "s/^X//" >'gold-lt.tex' <<'END_OF_FILE'
  444. X% gold-lt.tex - set LaTeX paper size
  445. X%
  446. X% Copyright 1989 Howard Lee Gayle
  447. X% This file is written in the ISO 8859/1 character set.
  448. X%
  449. X% $Header: gold-lt.tex,v 1.2 89/08/28 19:02:50 howard Exp $
  450. X%
  451. X% This program is free software; you can redistribute it and/or modify
  452. X% it under the terms of the GNU General Public License version 1,
  453. X% as published by the Free Software Foundation.
  454. X%
  455. X% This program is distributed in the hope that it will be useful,
  456. X% but WITHOUT ANY WARRANTY; without even the implied warranty of
  457. X% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  458. X% GNU General Public License for more details.
  459. X%
  460. X% You should have received a copy of the GNU General Public License
  461. X% along with this program; if not, write to the Free Software
  462. X% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  463. X%
  464. X% This file is for LaTeX output for A4 paper that may later be
  465. X% copied to 8.5 X 11 inch paper.  It maintains the following constraints:
  466. X% 1) Top and side margins are at least 25 mm, even after copying.
  467. X% 2) The bottom margin (below the page number) is at least 10 mm,
  468. X%    even after copying.
  469. X% 3) The body has the golden ratio.
  470. X% 4) The width should be 2--3 alphabets.
  471. X%
  472. X% The numbers are derived as follows.  An A4 page is 297 X 210 mm.
  473. X% An 8.5 X 11 page is 279 X 216 mm, rounded to the nearest mm.
  474. X% Allowing 25 mm for the top margin, 11 mm for the footer, and
  475. X% 10 mm for the bottom margin, we can compute the text height
  476. X% from the height of the shorter page (the 8.5 X 11) as:
  477. X% 279 - 25 - 11 - 10 = 233 mm.  Dividing by the golden ratio
  478. X% 0.5 * (1 + sqrt (5)) = 1.6180339887498948482045868343656381177203091798057628
  479. X% gives the text width of 145 mm.  This leaves
  480. X% (210 - 145) / 2 = 32 mm for the side margins with the narrower
  481. X% (A4) paper.
  482. X%
  483. X\setlength{\textheight}{233mm}
  484. X\setlength{\textwidth}{145mm}
  485. X\topmargin -14mm
  486. X\oddsidemargin 9mm
  487. X\evensidemargin 9mm
  488. END_OF_FILE
  489. if test 1887 -ne `wc -c <'gold-lt.tex'`; then
  490.     echo shar: \"'gold-lt.tex'\" unpacked with wrong size!
  491. fi
  492. # end of 'gold-lt.tex'
  493. fi
  494. if test -f 'lnR.1' -a "${1}" != "-c" ; then 
  495.   echo shar: Will not clobber existing file \"'lnR.1'\"
  496. else
  497. echo shar: Extracting \"'lnR.1'\" \(1639 characters\)
  498. sed "s/^X//" >'lnR.1' <<'END_OF_FILE'
  499. X.\" $Header: lnR.1,v 1.2 89/09/15 11:45:47 howard Exp $
  500. X.TH LNR 1 "$Revision: 1.2 $"
  501. X.SH NAME
  502. XlnR \- link contents of directory recursively
  503. X.SH SYNOPSIS
  504. X.B lnR
  505. X.RB [ " \-s " ] 
  506. X.RB [ " \-v " ] 
  507. X.I from to
  508. X.SH COPYRIGHT
  509. XCopyright \(co 1989 Howard Lee Gayle
  510. X.SH DESCRIPTION
  511. X.I LnR
  512. Xlinks the files in directory
  513. X.I from
  514. Xand recursively all subdirectories into the directory
  515. X.IR to .
  516. XIt creates directories as necessary.
  517. XIn other words, it performs a shallow copy.
  518. X.SH OPTIONS
  519. X.nr xx (\w'\-s  'u+2n)/1n
  520. X.TP \n(xx
  521. X.B \-s
  522. XUse symbolic links.
  523. XThe default is to use hard links.
  524. X.TP
  525. X.B \-v
  526. XVerbose.
  527. X.SH EXAMPLE
  528. X.nf
  529. X   lnR /usr/local/free-dist/tex/2.93 /usr/local/free/tex/2.93
  530. X.fi
  531. X.SH "SEE ALSO"
  532. X.IR ln (1).
  533. X.SH BUGS
  534. XIt should handle block and character special files.
  535. XIt should be able to copy directories' owners, groups, and modes.
  536. X.SH LICENSE
  537. XThis program is free software; you can redistribute it and/or modify
  538. Xit under the terms of the GNU General Public License version 1,
  539. Xas published by the Free Software Foundation.
  540. X.PP
  541. XThis program is distributed in the hope that it will be useful,
  542. Xbut WITHOUT ANY WARRANTY; without even the implied warranty of
  543. XMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  544. XGNU General Public License for more details.
  545. X.PP
  546. XYou should have received a copy of the GNU General Public License
  547. Xalong with this program; if not, write to the Free Software
  548. XFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  549. X.SH AUTHOR
  550. XHoward Gayle,
  551. XTN/ETX/T/BG,
  552. XEricsson Telecom AB,
  553. XS-126 25 Stockholm,
  554. XSweden,
  555. Xhoward@ericsson.se,
  556. Xuunet!ericsson.se!howard,
  557. XPhone: +46 8 719 5565,
  558. XFAX: +46 8 719 9598,
  559. XTelex: 14910 ERIC S
  560. END_OF_FILE
  561. if test 1639 -ne `wc -c <'lnR.1'`; then
  562.     echo shar: \"'lnR.1'\" unpacked with wrong size!
  563. fi
  564. # end of 'lnR.1'
  565. fi
  566. if test -f 'lnR0.b' -a "${1}" != "-c" ; then 
  567.   echo shar: Will not clobber existing file \"'lnR0.b'\"
  568. else
  569. echo shar: Extracting \"'lnR0.b'\" \(1535 characters\)
  570. sed "s/^X//" >'lnR0.b' <<'END_OF_FILE'
  571. X  
  572. X# lnR0 - auxiliary shell file for lnR
  573. X#
  574. X# $Header: lnR0.b,v 1.4 89/09/21 19:22:16 howard Exp $
  575. X#
  576. X# Copyright 1989 Howard Lee Gayle
  577. X# This file is written in the ISO 8859/1 character set.
  578. X#
  579. X# This program is free software; you can redistribute it and/or modify
  580. X# it under the terms of the GNU General Public License version 1,
  581. X# as published by the Free Software Foundation.
  582. X#
  583. X# This program is distributed in the hope that it will be useful,
  584. X# but WITHOUT ANY WARRANTY; without even the implied warranty of
  585. X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  586. X# GNU General Public License for more details.
  587. X#
  588. X# You should have received a copy of the GNU General Public License
  589. X# along with this program; if not, write to the Free Software
  590. X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  591. X#
  592. X# Shell variables:
  593. X# l - ln command
  594. X# m - mkdir command
  595. X# u - usage string
  596. X
  597. Xu='Usage: lnR0 symbolic verbose from to'
  598. Xif [ $# -ne 4 ]
  599. Xthen
  600. X   echo "$u" 1>&2
  601. X   exit 1
  602. Xfi
  603. Xl='ln'
  604. Xm='mkdir'
  605. Xif [ -b "$3" -o -c "$3" -o -p "$3" ]
  606. Xthen
  607. X   echo "$CMDNAME: can not link $3" 1>&2
  608. X   exit 1
  609. Xelif [ -h "$3" ]
  610. Xthen
  611. X   s=`ls -l "$3" | sed -e 's;^..* -> ;;'`
  612. X   if [ $2 = 1 ]
  613. X   then
  614. X      echo ln -s "$s" "$4"
  615. X   fi
  616. X   $l -s "$s" "$4"
  617. Xelif [ -d "$3" ]
  618. Xthen
  619. X   if [ ! -d "$4" ]
  620. X   then
  621. X      if [ $2 = 1 ]
  622. X      then
  623. X         echo mkdir "$4"
  624. X      fi
  625. X      $m "$4"
  626. X   fi
  627. Xelif [ -f "$3" ]
  628. Xthen
  629. X   if [ $2 = 1 ]
  630. X   then
  631. X      echo ln $1 "$3" "$4"
  632. X   fi
  633. X   $l $1 "$3" "$4"
  634. Xelse
  635. X   echo "$CMDNAME: file $3 does not exist" 1>&2
  636. X   exit 1
  637. Xfi
  638. END_OF_FILE
  639. if test 1535 -ne `wc -c <'lnR0.b'`; then
  640.     echo shar: \"'lnR0.b'\" unpacked with wrong size!
  641. fi
  642. # end of 'lnR0.b'
  643. fi
  644. if test -f 'malf.h' -a "${1}" != "-c" ; then 
  645.   echo shar: Will not clobber existing file \"'malf.h'\"
  646. else
  647. echo shar: Extracting \"'malf.h'\" \(1636 characters\)
  648. sed "s/^X//" >'malf.h' <<'END_OF_FILE'
  649. X/* malf.h - Declarations for using malf() functions.
  650. X *
  651. X * Copyright 1989 Howard Lee Gayle
  652. X *
  653. X * $Header: malf.h,v 1.18 89/08/20 10:45:05 howard Exp $
  654. X *
  655. X * This program is free software; you can redistribute it and/or modify
  656. X * it under the terms of the GNU General Public License version 1,
  657. X * as published by the Free Software Foundation.
  658. X *
  659. X * This program is distributed in the hope that it will be useful,
  660. X * but WITHOUT ANY WARRANTY; without even the implied warranty of
  661. X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  662. X * GNU General Public License for more details.
  663. X *
  664. X * You should have received a copy of the GNU General Public License
  665. X * along with this program; if not, write to the Free Software
  666. X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  667. X *
  668. X * Prerequisites: howard/port.h, howard/version.h.
  669. X */
  670. X
  671. X/* If this Boolean is true, calling malf() with a nonzero exit
  672. X * code will result in an abort() call and core dump instead of an
  673. X * exit() call.*/
  674. XPUBLIC boolT _debug;
  675. X
  676. XPUBLIC bStrT    getlic();
  677. XPUBLIC bStrT    getlin();
  678. XPUBLIC bStrT    getpwf();
  679. XPUBLIC void     malf();
  680. XPUBLIC void     malf0();
  681. XPUBLIC void     malf1();
  682. XPUBLIC voidPT   mcalloc();
  683. XPUBLIC bStrT    mcpstr();
  684. XPUBLIC void     mfclose();
  685. XPUBLIC void     mfcopy();
  686. XPUBLIC void     mfflush();
  687. XPUBLIC streamT  mfopen();
  688. XPUBLIC void     mfseek();
  689. XPUBLIC streamT  mopenp();
  690. XPUBLIC boolT    msgfn();
  691. XPUBLIC bStrT    prefix();
  692. XPUBLIC bStrT    prefxi();
  693. XPUBLIC void     putspn();
  694. XPUBLIC void     qrndr ();
  695. XPUBLIC void     qrnds ();
  696. XPUBLIC long     qrndu ();
  697. XPUBLIC bStrT    strend();
  698. XPUBLIC bStrT    userfn();
  699. XPUBLIC unsigned yrwk();
  700. END_OF_FILE
  701. if test 1636 -ne `wc -c <'malf.h'`; then
  702.     echo shar: \"'malf.h'\" unpacked with wrong size!
  703. fi
  704. # end of 'malf.h'
  705. fi
  706. if test -f 'mcpstr.3' -a "${1}" != "-c" ; then 
  707.   echo shar: Will not clobber existing file \"'mcpstr.3'\"
  708. else
  709. echo shar: Extracting \"'mcpstr.3'\" \(1602 characters\)
  710. sed "s/^X//" >'mcpstr.3' <<'END_OF_FILE'
  711. X.\" $Header: mcpstr.3,v 1.2 89/05/18 10:56:17 howard Exp $
  712. X.TH MCPSTR "3 -lhoward" "$Revision: 1.2 $" "Howard\'s C library" "Howard\'s C library"
  713. X.SH NAME
  714. Xmcpstr \- make a new copy of a string and check for errors
  715. X.SH SYNOPSIS
  716. X.nf
  717. X.BR "#include <" stdio.h ">"
  718. X.BR "#include <" howard/port.h ">"
  719. X.BR "#include <" howard/malf.h ">"
  720. X.fi
  721. X.LP
  722. X.RI "bStrT mcpstr (" orig ")"
  723. X.nf
  724. X.RI "bStrT " orig ";"
  725. X.SH COPYRIGHT
  726. XCopyright \(co 1989 Howard Lee Gayle
  727. X.SH DESCRIPTION
  728. X.I Mcpstr
  729. Xallocates dynamic memory (using
  730. X.IR malloc (3))
  731. Xto hold the string
  732. X.IR orig .
  733. XIt then copies
  734. X.I orig
  735. Xinto the newly allocated memory, and returns a pointer to it.
  736. XHowever, if
  737. X.I malloc
  738. Xindicates an error then
  739. X.I mcpstr
  740. Xcalls
  741. X.I malf1 ","
  742. Xwhich does not return.
  743. X.SH "SEE ALSO"
  744. X.IR malloc (3),
  745. X.IR malf "(3 -lhoward)."
  746. X.SH LICENSE
  747. XThis program is free software; you can redistribute it and/or modify
  748. Xit under the terms of the GNU General Public License version 1,
  749. Xas published by the Free Software Foundation.
  750. X.PP
  751. XThis program is distributed in the hope that it will be useful,
  752. Xbut WITHOUT ANY WARRANTY; without even the implied warranty of
  753. XMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  754. XGNU General Public License for more details.
  755. X.PP
  756. XYou should have received a copy of the GNU General Public License
  757. Xalong with this program; if not, write to the Free Software
  758. XFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  759. X.SH AUTHOR
  760. XHoward Gayle,
  761. XTN/ETX/T/BG,
  762. XEricsson Telecom AB,
  763. XS-126 25 Stockholm,
  764. XSweden,
  765. Xhoward@ericsson.se,
  766. Xuunet!ericsson.se!howard,
  767. XPhone: +46 8 719 5565,
  768. XFAX: +46 8 719 9598,
  769. XTelex: 14910 ERIC S
  770. END_OF_FILE
  771. if test 1602 -ne `wc -c <'mcpstr.3'`; then
  772.     echo shar: \"'mcpstr.3'\" unpacked with wrong size!
  773. fi
  774. # end of 'mcpstr.3'
  775. fi
  776. if test -f 'memcmp.c' -a "${1}" != "-c" ; then 
  777.   echo shar: Will not clobber existing file \"'memcmp.c'\"
  778. else
  779. echo shar: Extracting \"'memcmp.c'\" \(569 characters\)
  780. sed "s/^X//" >'memcmp.c' <<'END_OF_FILE'
  781. X/*
  782. X * memcmp - compare arrays of bytes
  783. X *
  784. X * Public domain code by Henry Spencer.
  785. X */
  786. X
  787. X#include <stdio.h>
  788. X#include <howard/port.h>
  789. X#include <howard/version.h>
  790. X
  791. XMODVER ("@(#)$Header: memcmp.c,v 1.1 89/08/15 18:17:12 howard Exp $");
  792. X
  793. X#ifdef NOMEMCMP
  794. Xint                /* <0, == 0, >0 */
  795. Xmemcmp(s1, s2, size)
  796. X char * s1;
  797. X char * s2;
  798. Xint size;
  799. X{
  800. X    register  char *scan1;
  801. X    register  char *scan2;
  802. X    register int n;
  803. X
  804. X    scan1 = s1;
  805. X    scan2 = s2;
  806. X    for (n = size; n > 0; n--)
  807. X        if (*scan1 == *scan2) {
  808. X            scan1++;
  809. X            scan2++;
  810. X        } else
  811. X            return(*scan1 - *scan2);
  812. X
  813. X    return(0);
  814. X}
  815. X#endif NOMEMCMP
  816. END_OF_FILE
  817. if test 569 -ne `wc -c <'memcmp.c'`; then
  818.     echo shar: \"'memcmp.c'\" unpacked with wrong size!
  819. fi
  820. # end of 'memcmp.c'
  821. fi
  822. if test -f 'mfclose.c' -a "${1}" != "-c" ; then 
  823.   echo shar: Will not clobber existing file \"'mfclose.c'\"
  824. else
  825. echo shar: Extracting \"'mfclose.c'\" \(1668 characters\)
  826. sed "s/^X//" >'mfclose.c' <<'END_OF_FILE'
  827. X/*
  828. X * mfclose - fclose() + malf1()
  829. X */
  830. X
  831. X#ifndef lint
  832. Xstatic char _cpyrgt[] = "Copyright 1989 Howard Lee Gayle";
  833. X#endif lint
  834. X
  835. X/*
  836. X * This program is free software; you can redistribute it and/or modify
  837. X * it under the terms of the GNU General Public License version 1,
  838. X * as published by the Free Software Foundation.
  839. X *
  840. X * This program is distributed in the hope that it will be useful,
  841. X * but WITHOUT ANY WARRANTY; without even the implied warranty of
  842. X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  843. X * GNU General Public License for more details.
  844. X *
  845. X * You should have received a copy of the GNU General Public License
  846. X * along with this program; if not, write to the Free Software
  847. X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  848. X */
  849. X
  850. X#include <stdio.h>
  851. X#include <howard/port.h>
  852. X#include <howard/version.h>
  853. X
  854. XMODVER ("@(#)$Header: mfclose.c,v 1.3 89/08/13 14:53:25 howard Exp $");
  855. X
  856. X#include <howard/malf.h>
  857. X#include <howard/registers.i>
  858. X
  859. XPUBLIC void mfclose (s, n)
  860. XstreamT s; /* Stream to close.*/
  861. XbStrT   n; /* File name.*/
  862. X
  863. X
  864. X/* Function:
  865. X *    
  866. X * Algorithm:
  867. X *    Call fclose().  On error call malf1().
  868. X * Returns:
  869. X *    
  870. X * Notes:
  871. X *    
  872. X */
  873. X{
  874. Xif (fclose (s)) malf1 ("%s: Can not close", n);
  875. X}
  876. X
  877. X#ifdef TEST
  878. X#include <howard/usage.h>
  879. X
  880. XMAINVER ("@(#)$Header: mfclose.c,v 1.3 89/08/13 14:53:25 howard Exp $");
  881. XUSAGE ("file");
  882. X
  883. XPUBLIC int main (argc, argv)
  884. Xint    argc; /* Number of arguments.*/
  885. XbStrT *argv; /* Points to array of argument strings.*/
  886. X{
  887. Xif (2 != argc) usage();
  888. Xmfclose (mfopen (argv[1], "r"), argv[1]);
  889. XPUTS ("Success");
  890. Xmfflush (stdout, "Standard Output");
  891. Xexit (SUCCESS);
  892. X
  893. X#ifdef lint
  894. Xreturn (SUCCESS);
  895. X#endif
  896. X}
  897. X#endif
  898. END_OF_FILE
  899. if test 1668 -ne `wc -c <'mfclose.c'`; then
  900.     echo shar: \"'mfclose.c'\" unpacked with wrong size!
  901. fi
  902. # end of 'mfclose.c'
  903. fi
  904. if test -f 'mfopen.c' -a "${1}" != "-c" ; then 
  905.   echo shar: Will not clobber existing file \"'mfopen.c'\"
  906. else
  907. echo shar: Extracting \"'mfopen.c'\" \(1792 characters\)
  908. sed "s/^X//" >'mfopen.c' <<'END_OF_FILE'
  909. X/*
  910. X * mfopen - try to open file and report errors with malf
  911. X */
  912. X
  913. X#ifndef lint
  914. Xstatic char _cpyrgt[] = "Copyright 1989 Howard Lee Gayle";
  915. X#endif lint
  916. X
  917. X/*
  918. X * This program is free software; you can redistribute it and/or modify
  919. X * it under the terms of the GNU General Public License version 1,
  920. X * as published by the Free Software Foundation.
  921. X *
  922. X * This program is distributed in the hope that it will be useful,
  923. X * but WITHOUT ANY WARRANTY; without even the implied warranty of
  924. X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  925. X * GNU General Public License for more details.
  926. X *
  927. X * You should have received a copy of the GNU General Public License
  928. X * along with this program; if not, write to the Free Software
  929. X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  930. X */
  931. X
  932. X#include <stdio.h>
  933. X#include <howard/port.h>
  934. X#include <howard/version.h>
  935. X
  936. XMODVER ("@(#)$Header: mfopen.c,v 1.5 89/08/13 15:07:38 howard Exp $");
  937. X
  938. X#include <howard/malf.h>
  939. X#include <howard/registers.i>
  940. X
  941. XPUBLIC streamT mfopen (n, m)
  942. XbStrT n; /* File name.*/
  943. XbStrT m; /* Mode string.*/
  944. X
  945. X/* Function:
  946. X *    Attempt to open the file.  On error call malf1().
  947. X * Algorithm:
  948. X *    Call fopen().
  949. X * Returns:
  950. X *    On success, the streamT for the opened file.  No return on error.
  951. X * Notes:
  952. X *    
  953. X */
  954. X{
  955. XR1 streamT s = fopen (S(n), S(m)); /* Stream.*/
  956. X
  957. Xif (NULSTRM == s) malf1 ("%s: Can not open mode %s", n, m);
  958. Xreturn (s);
  959. X}
  960. X
  961. X#ifdef TEST
  962. X#include <howard/usage.h>
  963. X
  964. XMAINVER ("@(#)$Header: mfopen.c,v 1.5 89/08/13 15:07:38 howard Exp $");
  965. XUSAGE ("filename mode");
  966. X
  967. XPUBLIC int main (argc, argv)
  968. Xint    argc; /* Number of arguments.*/
  969. XbStrT *argv; /* Points to array of argument strings.*/
  970. X{
  971. Xif (3 != argc) usage();
  972. X(void) mfopen (argv[1], argv[2]);
  973. Xexit (SUCCESS);
  974. X
  975. X#ifdef lint
  976. Xreturn (SUCCESS);
  977. X#endif
  978. X}
  979. X#endif
  980. END_OF_FILE
  981. if test 1792 -ne `wc -c <'mfopen.c'`; then
  982.     echo shar: \"'mfopen.c'\" unpacked with wrong size!
  983. fi
  984. # end of 'mfopen.c'
  985. fi
  986. if test -f 'mkFreeze.b' -a "${1}" != "-c" ; then 
  987.   echo shar: Will not clobber existing file \"'mkFreeze.b'\"
  988. else
  989. echo shar: Extracting \"'mkFreeze.b'\" \(1422 characters\)
  990. sed "s/^X//" >'mkFreeze.b' <<'END_OF_FILE'
  991. X  
  992. X# mkFreeze - make FREEZE.{date,i,major,minor,version}
  993. X#
  994. X# $Header: mkFreeze.b,v 1.3 89/09/20 13:40:05 howard Exp $
  995. X#
  996. X# Copyright 1989 Howard Lee Gayle
  997. X# This file is written in the ISO 8859/1 character set.
  998. X#
  999. X# This program is free software; you can redistribute it and/or modify
  1000. X# it under the terms of the GNU General Public License version 1,
  1001. X# as published by the Free Software Foundation.
  1002. X#
  1003. X# This program is distributed in the hope that it will be useful,
  1004. X# but WITHOUT ANY WARRANTY; without even the implied warranty of
  1005. X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  1006. X# GNU General Public License for more details.
  1007. X#
  1008. X# You should have received a copy of the GNU General Public License
  1009. X# along with this program; if not, write to the Free Software
  1010. X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  1011. X#
  1012. X# Shell variables:
  1013. X# u - usage string
  1014. X
  1015. XCMDNAME=mkFreeze
  1016. Xexport CMDNAME
  1017. Xu="Usage: $CMDNAME"
  1018. Xif [ $# -ne 0 ]
  1019. Xthen
  1020. X   echo "$u" 1>&2
  1021. X   exit 1
  1022. Xfi
  1023. Xawk '/^.Header: FREEZE,v /{
  1024. X   print $3 > "FREEZE.version";
  1025. X   split ($3, t, ".");
  1026. X   print t[1] > "FREEZE.major";
  1027. X   print t[2] > "FREEZE.minor";
  1028. X   y=substr($4,1,2);
  1029. X   if (y < 70) y += 2000; else y += 1900;
  1030. X   dat=sprintf "%d-%s-%s %s",y,substr($4,4,2),substr($4,7,2),$5;
  1031. X   print dat > "FREEZE.date";
  1032. X   d = "#define FRZ_";
  1033. X   printf "%sMAJ %s\n%sMIN %s\n%sDAT \"%s\"\n%sID  \"@(#)%s\"\n",d,t[1],d,t[2],d,dat,d,$0 > "FREEZE.i";
  1034. X}' < FREEZE
  1035. END_OF_FILE
  1036. if test 1422 -ne `wc -c <'mkFreeze.b'`; then
  1037.     echo shar: \"'mkFreeze.b'\" unpacked with wrong size!
  1038. fi
  1039. # end of 'mkFreeze.b'
  1040. fi
  1041. if test -f 'new-1.b' -a "${1}" != "-c" ; then 
  1042.   echo shar: Will not clobber existing file \"'new-1.b'\"
  1043. else
  1044. echo shar: Extracting \"'new-1.b'\" \(1653 characters\)
  1045. sed "s/^X//" >'new-1.b' <<'END_OF_FILE'
  1046. X  
  1047. X# new-1.b - create a new section 1 manual entry source file from a prototype
  1048. X#
  1049. X# $Header: new-1.b,v 1.2 89/09/21 12:39:49 howard Exp $
  1050. X#
  1051. X# Copyright 1989 Howard Lee Gayle
  1052. X# This file is written in the ISO 8859/1 character set.
  1053. X#
  1054. X# This program is free software; you can redistribute it and/or modify
  1055. X# it under the terms of the GNU General Public License version 1,
  1056. X# as published by the Free Software Foundation.
  1057. X#
  1058. X# This program is distributed in the hope that it will be useful,
  1059. X# but WITHOUT ANY WARRANTY; without even the implied warranty of
  1060. X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  1061. X# GNU General Public License for more details.
  1062. X#
  1063. X# You should have received a copy of the GNU General Public License
  1064. X# along with this program; if not, write to the Free Software
  1065. X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  1066. X#
  1067. X# Shell variables:
  1068. X# a - file name prefix in all caps
  1069. X# d - '$'
  1070. X# f - steps through files to create
  1071. X# p - file name prefix
  1072. X# u - usage string
  1073. X
  1074. XCMDNAME=new-1
  1075. Xexport CMDNAME
  1076. Xu="Usage: $CMDNAME file..."
  1077. Xif [ $# -eq 0 ]
  1078. Xthen
  1079. X   echo "$u" 1>&2
  1080. X   exit 1
  1081. Xfi
  1082. Xd='$'
  1083. Xfor f
  1084. Xdo
  1085. X   p=`basename "$f" .1`
  1086. X   a=`echo "$p" | tr '[a-z]' '[A-Z]'`
  1087. X   cat << EOF > "$f"
  1088. X.\" ${d}Header${d}
  1089. X.TH $a 1 "${d}Revision${d}"
  1090. X.SH NAME
  1091. X$p \- 
  1092. X.SH SYNOPSIS
  1093. X.B $p
  1094. X.RB [ " \-o " ] 
  1095. X.I filename \&.\|.\|.
  1096. XEOF
  1097. X   if [ "$NEWTEXTPATH" ]
  1098. X   then
  1099. X      cat-path "$NEWTEXTPATH" new-1.cprt >> "$f"
  1100. X   fi
  1101. X   cat << EOF >> "$f"
  1102. X.SH DESCRIPTION
  1103. X.I $p
  1104. X
  1105. X.SH OPTIONS
  1106. X.SH EXAMPLE
  1107. X.nf
  1108. X.fi
  1109. X.SH FILES
  1110. X.DT
  1111. X.nf
  1112. X.fi
  1113. X.SH "SEE ALSO"
  1114. X.SH DIAGNOSTICS
  1115. X.SH BUGS
  1116. XEOF
  1117. X   if [ "$NEWTEXTPATH" ]
  1118. X   then
  1119. X      cat-path "$NEWTEXTPATH" new-1.txt >> "$f"
  1120. X   fi
  1121. Xdone
  1122. END_OF_FILE
  1123. if test 1653 -ne `wc -c <'new-1.b'`; then
  1124.     echo shar: \"'new-1.b'\" unpacked with wrong size!
  1125. fi
  1126. # end of 'new-1.b'
  1127. fi
  1128. if test -f 'new-3.b' -a "${1}" != "-c" ; then 
  1129.   echo shar: Will not clobber existing file \"'new-3.b'\"
  1130. else
  1131. echo shar: Extracting \"'new-3.b'\" \(1656 characters\)
  1132. sed "s/^X//" >'new-3.b' <<'END_OF_FILE'
  1133. X  
  1134. X# new-3.b - create a new section 3 manual entry source file from a prototype
  1135. X#
  1136. X# $Header: new-3.b,v 1.1 89/09/21 12:44:29 howard Exp $
  1137. X#
  1138. X# Copyright 1989 Howard Lee Gayle
  1139. X# This file is written in the ISO 8859/1 character set.
  1140. X#
  1141. X# This program is free software; you can redistribute it and/or modify
  1142. X# it under the terms of the GNU General Public License version 1,
  1143. X# as published by the Free Software Foundation.
  1144. X#
  1145. X# This program is distributed in the hope that it will be useful,
  1146. X# but WITHOUT ANY WARRANTY; without even the implied warranty of
  1147. X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  1148. X# GNU General Public License for more details.
  1149. X#
  1150. X# You should have received a copy of the GNU General Public License
  1151. X# along with this program; if not, write to the Free Software
  1152. X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  1153. X#
  1154. X# Shell variables:
  1155. X# a - file name prefix in all caps
  1156. X# d - '$'
  1157. X# f - steps through files to create
  1158. X# p - file name prefix
  1159. X# u - usage string
  1160. X
  1161. XCMDNAME=new-3
  1162. Xexport CMDNAME
  1163. Xu="Usage: $CMDNAME file..."
  1164. Xif [ $# -eq 0 ]
  1165. Xthen
  1166. X   echo "$u" 1>&2
  1167. X   exit 1
  1168. Xfi
  1169. Xd='$'
  1170. Xfor f
  1171. Xdo
  1172. X   p=`basename "$f" .3`
  1173. X   a=`echo "$p" | tr '[a-z]' '[A-Z]'`
  1174. X   cat << EOF > "$f"
  1175. X.\" ${d}Header${d}
  1176. X.TH $a 3 "${d}Revision${d}"
  1177. X.SH NAME
  1178. X$p \- 
  1179. X.SH SYNOPSIS
  1180. X.nf
  1181. X.BR "#include <" stdio.h ">"
  1182. X.fi
  1183. X.LP
  1184. X.BR "void " "$p ("
  1185. XEOF
  1186. X   if [ "$NEWTEXTPATH" ]
  1187. X   then
  1188. X      cat-path "$NEWTEXTPATH" new-3.cprt >> "$f"
  1189. X   fi
  1190. X   cat << EOF >> "$f"
  1191. X.SH DESCRIPTION
  1192. X.I $p
  1193. X.SH RETURNS
  1194. X.SH EXAMPLES
  1195. X.nf
  1196. X.fi
  1197. X.SH FILES
  1198. X.SH "SEE ALSO"
  1199. X.SH DIAGNOSTICS
  1200. X.SH BUGS
  1201. XEOF
  1202. X   if [ "$NEWTEXTPATH" ]
  1203. X   then
  1204. X      cat-path "$NEWTEXTPATH" new-3.txt >> "$f"
  1205. X   fi
  1206. Xdone
  1207. END_OF_FILE
  1208. if test 1656 -ne `wc -c <'new-3.b'`; then
  1209.     echo shar: \"'new-3.b'\" unpacked with wrong size!
  1210. fi
  1211. # end of 'new-3.b'
  1212. fi
  1213. if test -f 'new-MakeC.b' -a "${1}" != "-c" ; then 
  1214.   echo shar: Will not clobber existing file \"'new-MakeC.b'\"
  1215. else
  1216. echo shar: Extracting \"'new-MakeC.b'\" \(1624 characters\)
  1217. sed "s/^X//" >'new-MakeC.b' <<'END_OF_FILE'
  1218. X  
  1219. X# new-MakeC.b - create a new MakeCommon file from a prototype
  1220. X#
  1221. X# $Header: new-MakeC.b,v 1.1 89/09/21 12:48:58 howard Exp $
  1222. X#
  1223. X# Copyright 1989 Howard Lee Gayle
  1224. X# This file is written in the ISO 8859/1 character set.
  1225. X#
  1226. X# This program is free software; you can redistribute it and/or modify
  1227. X# it under the terms of the GNU General Public License version 1,
  1228. X# as published by the Free Software Foundation.
  1229. X#
  1230. X# This program is distributed in the hope that it will be useful,
  1231. X# but WITHOUT ANY WARRANTY; without even the implied warranty of
  1232. X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  1233. X# GNU General Public License for more details.
  1234. X#
  1235. X# You should have received a copy of the GNU General Public License
  1236. X# along with this program; if not, write to the Free Software
  1237. X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  1238. X#
  1239. X# Shell variables:
  1240. X# c - '#'
  1241. X# d - '$'
  1242. X# f - steps through files to create
  1243. X# u - usage string
  1244. X
  1245. XCMDNAME=new-MakeC
  1246. Xexport CMDNAME
  1247. Xu="Usage: $CMDNAME file..."
  1248. Xif [ $# -eq 0 ]
  1249. Xthen
  1250. X   echo "$u" 1>&2
  1251. X   exit 1
  1252. Xfi
  1253. Xc='#'
  1254. Xd='$'
  1255. Xfor f
  1256. Xdo
  1257. X   cat << EOF > "$f"
  1258. X$c $f - common definitions for uMakefile and Makefile for ~
  1259. X$c
  1260. X$c ${d}Header$d
  1261. X$c
  1262. XEOF
  1263. X   if [ "$NEWTEXTPATH" ]
  1264. X   then
  1265. X      cat-path "$NEWTEXTPATH" new.txt | sed -e "s;^;$c ;" >> "$f"
  1266. X   fi
  1267. X   cat << 'EOF' >> "$f"
  1268. X
  1269. X# Change mode of a file.
  1270. XCHMOD=chmod
  1271. X
  1272. X# Get a file from the distribution directory.
  1273. XDISTI=mkDistI
  1274. X
  1275. X# Remove a file.
  1276. XRM=zap -f
  1277. X
  1278. X# Uncompress if necessary and check out from RCS or SCCS.
  1279. XUNCMPRS=mkUncmprs
  1280. X
  1281. X# C include file search path.
  1282. XINCLUDES=-I/usr/local/local-include -I/usr/local/free/howard/0/include
  1283. XEOF
  1284. Xdone
  1285. END_OF_FILE
  1286. if test 1624 -ne `wc -c <'new-MakeC.b'`; then
  1287.     echo shar: \"'new-MakeC.b'\" unpacked with wrong size!
  1288. fi
  1289. # end of 'new-MakeC.b'
  1290. fi
  1291. if test -f 'smpdtl.c' -a "${1}" != "-c" ; then 
  1292.   echo shar: Will not clobber existing file \"'smpdtl.c'\"
  1293. else
  1294. echo shar: Extracting \"'smpdtl.c'\" \(1735 characters\)
  1295. sed "s/^X//" >'smpdtl.c' <<'END_OF_FILE'
  1296. X/*
  1297. X * smpdtl - look up character in digit table
  1298. X */
  1299. X
  1300. X#ifndef lint
  1301. Xstatic char _cpyrgt[] = "Copyright 1989 Howard Lee Gayle";
  1302. X#endif lint
  1303. X
  1304. X/*
  1305. X * This program is free software; you can redistribute it and/or modify
  1306. X * it under the terms of the GNU General Public License version 1,
  1307. X * as published by the Free Software Foundation.
  1308. X *
  1309. X * This program is distributed in the hope that it will be useful,
  1310. X * but WITHOUT ANY WARRANTY; without even the implied warranty of
  1311. X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  1312. X * GNU General Public License for more details.
  1313. X *
  1314. X * You should have received a copy of the GNU General Public License
  1315. X * along with this program; if not, write to the Free Software
  1316. X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  1317. X */
  1318. X
  1319. X#include <stdio.h>
  1320. X#include <howard/port.h>
  1321. X#include <howard/version.h>
  1322. X
  1323. XMODVER ("@(#)$Header: smpdtl.c,v 1.6 89/08/14 17:37:31 howard Exp $");
  1324. X
  1325. X#include <errno.h>
  1326. X#include <string.h>
  1327. X#include <howard/registers.i>
  1328. X#include <howard/simultipre.i>
  1329. X#include <howard/smp.h>
  1330. X
  1331. XPUBLIC int smpdtl (c, dt)
  1332. XR2 rcharT  c;  /* Character to look up.*/
  1333. XR3 bStrT  *dt; /* Digit table.*/
  1334. X
  1335. X/* Function:
  1336. X *    Search digit table dt for character c.
  1337. X * Algorithm:
  1338. X *    Linear search.
  1339. X * Returns:
  1340. X *    Index into dt on success, -1 on error.
  1341. X * Notes:
  1342. X *    
  1343. X */
  1344. X{
  1345. XR1 bStrT *p; /* Steps through dt.*/
  1346. X
  1347. Xfor (p = dt; (NULBSTR != *p) && (NULCSTR == strchr ((cStrT) *p, c)); ++p)
  1348. X   ;
  1349. Xreturn ((NULBSTR == *p) ? -1 : p - dt);
  1350. X}
  1351. X
  1352. X#ifdef TEST
  1353. X#include <howard/usage.h>
  1354. X
  1355. XMAINVER ("@(#)$Header: smpdtl.c,v 1.6 89/08/14 17:37:31 howard Exp $");
  1356. XUSAGE ("");
  1357. X
  1358. X#include <howard/malf.h>
  1359. X
  1360. XPUBLIC int main ()
  1361. X{
  1362. Xmalf1 ("Testing done in a2smp");
  1363. X
  1364. X#ifdef lint
  1365. Xreturn (SUCCESS);
  1366. X#endif
  1367. X}
  1368. X#endif
  1369. END_OF_FILE
  1370. if test 1735 -ne `wc -c <'smpdtl.c'`; then
  1371.     echo shar: \"'smpdtl.c'\" unpacked with wrong size!
  1372. fi
  1373. # end of 'smpdtl.c'
  1374. fi
  1375. if test -f 'strend.3' -a "${1}" != "-c" ; then 
  1376.   echo shar: Will not clobber existing file \"'strend.3'\"
  1377. else
  1378. echo shar: Extracting \"'strend.3'\" \(1536 characters\)
  1379. sed "s/^X//" >'strend.3' <<'END_OF_FILE'
  1380. X.\" $Header: strend.3,v 1.6 89/08/14 09:31:24 howard Exp $
  1381. X.TH STREND "3 -lhoward" "$Revision: 1.6 $" "Howard\'s C library" "Howard\'s C library"
  1382. X.SH NAME
  1383. Xstrend \- return pointer to NUL at end of string
  1384. X.SH SYNOPSIS
  1385. X.nf
  1386. X.BR "#include <" stdio.h ">"
  1387. X.BR "#include <" howard/port.h ">"
  1388. X.BR "#include <" howard/malf.h ">"
  1389. X.fi
  1390. X.LP
  1391. X.BR "void " "strend ("
  1392. X.IR s )
  1393. X.nf
  1394. X.RI "bStrT " s ";"
  1395. X.SH COPYRIGHT
  1396. XCopyright \(co 1989 Howard Lee Gayle
  1397. X.SH DESCRIPTION
  1398. X.I Strend
  1399. Xreturns a pointer to the ASCII NUL character that terminates string
  1400. X.IR s .
  1401. X.SH DIAGNOSTICS
  1402. XIf
  1403. X.I s
  1404. Xis NULL,
  1405. X.I strend
  1406. Xcalls
  1407. X.IR malf1 "(3 -lhoward)."
  1408. X.SH "SEE ALSO"
  1409. X.IR malf "(3 \-lhoward),"
  1410. X.IR string (3).
  1411. X.SH LICENSE
  1412. XThis program is free software; you can redistribute it and/or modify
  1413. Xit under the terms of the GNU General Public License version 1,
  1414. Xas published by the Free Software Foundation.
  1415. X.PP
  1416. XThis program is distributed in the hope that it will be useful,
  1417. Xbut WITHOUT ANY WARRANTY; without even the implied warranty of
  1418. XMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  1419. XGNU General Public License for more details.
  1420. X.PP
  1421. XYou should have received a copy of the GNU General Public License
  1422. Xalong with this program; if not, write to the Free Software
  1423. XFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  1424. X.SH AUTHOR
  1425. XHoward Gayle,
  1426. XTN/ETX/T/BG,
  1427. XEricsson Telecom AB,
  1428. XS-126 25 Stockholm,
  1429. XSweden,
  1430. Xhoward@ericsson.se,
  1431. Xuunet!ericsson.se!howard,
  1432. XPhone: +46 8 719 5565,
  1433. XFAX: +46 8 719 9598,
  1434. XTelex: 14910 ERIC S
  1435. X.PP
  1436. XThe idea comes from PWB, but all code is original.
  1437. END_OF_FILE
  1438. if test 1536 -ne `wc -c <'strend.3'`; then
  1439.     echo shar: \"'strend.3'\" unpacked with wrong size!
  1440. fi
  1441. # end of 'strend.3'
  1442. fi
  1443. if test -f 'strend.c' -a "${1}" != "-c" ; then 
  1444.   echo shar: Will not clobber existing file \"'strend.c'\"
  1445. else
  1446. echo shar: Extracting \"'strend.c'\" \(1543 characters\)
  1447. sed "s/^X//" >'strend.c' <<'END_OF_FILE'
  1448. X/*
  1449. X * strend - return pointer to NUL at end of string
  1450. X */
  1451. X
  1452. X#ifndef lint
  1453. Xstatic char _cpyrgt[] = "Copyright 1989 Howard Lee Gayle";
  1454. X#endif lint
  1455. X
  1456. X/*
  1457. X * This program is free software; you can redistribute it and/or modify
  1458. X * it under the terms of the GNU General Public License version 1,
  1459. X * as published by the Free Software Foundation.
  1460. X *
  1461. X * This program is distributed in the hope that it will be useful,
  1462. X * but WITHOUT ANY WARRANTY; without even the implied warranty of
  1463. X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  1464. X * GNU General Public License for more details.
  1465. X *
  1466. X * You should have received a copy of the GNU General Public License
  1467. X * along with this program; if not, write to the Free Software
  1468. X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  1469. X */
  1470. X
  1471. X#include <stdio.h>
  1472. X#include <howard/port.h>
  1473. X#include <howard/version.h>
  1474. X
  1475. XMODVER ("@(#)$Header: strend.c,v 1.6 89/08/14 09:27:31 howard Exp $");
  1476. X
  1477. X#include <howard/registers.i>
  1478. X#include <howard/malf.h>
  1479. X
  1480. XPUBLIC bStrT strend (p)
  1481. XR1 bStrT p; /* The string.*/
  1482. X
  1483. X/* Function:
  1484. X *    Return a pointer to the NUL terminator of string p.
  1485. X * Algorithm:
  1486. X *    Step through it.
  1487. X * Returns:
  1488. X *    Pointer.
  1489. X */
  1490. X{
  1491. Xif (NULBSTR == p) malf1 ("strend: null argument");
  1492. Xwhile (EOS != B (*p))
  1493. X   ++p;
  1494. Xreturn (p);
  1495. X}
  1496. X
  1497. X#ifdef TEST
  1498. X#include <howard/usage.h>
  1499. X
  1500. XMAINVER ("@(#)$Header: strend.c,v 1.6 89/08/14 09:27:31 howard Exp $");
  1501. XUSAGE ("");
  1502. X
  1503. Xmain()
  1504. X{
  1505. XbStrT s = S("123");
  1506. X
  1507. Xif (&s[3] != strend (s)) malf1 ("Test failed");
  1508. Xexit (SUCCESS);
  1509. X
  1510. X#ifdef lint
  1511. Xreturn (SUCCESS);
  1512. X#endif
  1513. X}
  1514. X#endif
  1515. END_OF_FILE
  1516. if test 1543 -ne `wc -c <'strend.c'`; then
  1517.     echo shar: \"'strend.c'\" unpacked with wrong size!
  1518. fi
  1519. # end of 'strend.c'
  1520. fi
  1521. if test -f 'usage.3' -a "${1}" != "-c" ; then 
  1522.   echo shar: Will not clobber existing file \"'usage.3'\"
  1523. else
  1524. echo shar: Extracting \"'usage.3'\" \(1769 characters\)
  1525. sed "s/^X//" >'usage.3' <<'END_OF_FILE'
  1526. X.\" @(#)$Header: usage.3,v 1.5 89/08/14 09:23:24 howard Exp $
  1527. X.TH USAGE "3 -lhoward" "$Revision: 1.5 $" "Howard\'s C library" "Howard\'s C library"
  1528. X.SH NAME
  1529. Xusage \- write usage message on standard error and exit
  1530. X.SH SYNOPSIS
  1531. X.nf
  1532. X.BR "#include <" stdio.h ">"
  1533. X.BR "#include <" howard/port.h ">"
  1534. X.BR "#include <" howard/version.h ">"
  1535. X.BR "#include <" howard/usage.h ">"
  1536. X.PP
  1537. X.RI "MAINVER (" version ");"
  1538. X.RI "USAGE (" message ");"
  1539. X.LP
  1540. X.BR "void " "usage()"
  1541. X.SH COPYRIGHT
  1542. XCopyright \(co 1989 Howard Lee Gayle
  1543. X.SH DESCRIPTION
  1544. X.I Usage
  1545. Xwrites a usage message on standard error and then exits
  1546. Xwith exit code 1.
  1547. XIt calls
  1548. X.IR putspn (3)
  1549. Xto write the program name.
  1550. X.SH EXAMPLE
  1551. XThe following example shows use with rcs.
  1552. X.nf
  1553. X   MAINVER ("@(#)$Header: usage.3,v 1.5 89/08/14 09:23:24 howard Exp $");
  1554. X   USAGE ("[-a] [-b] file...");
  1555. X   \&.
  1556. X   \&.
  1557. X   \&.
  1558. X   main (argc, argv)
  1559. X   \&.
  1560. X   \&.
  1561. X   \&.
  1562. X   if (2 > argc) usage();
  1563. X.fi
  1564. X.SH "SEE ALSO"
  1565. X.IR putspn "(3 \-lhoward)."
  1566. X.SH LICENSE
  1567. XThis program is free software; you can redistribute it and/or modify
  1568. Xit under the terms of the GNU General Public License version 1,
  1569. Xas published by the Free Software Foundation.
  1570. X.PP
  1571. XThis program is distributed in the hope that it will be useful,
  1572. Xbut WITHOUT ANY WARRANTY; without even the implied warranty of
  1573. XMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  1574. XGNU General Public License for more details.
  1575. X.PP
  1576. XYou should have received a copy of the GNU General Public License
  1577. Xalong with this program; if not, write to the Free Software
  1578. XFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  1579. X.SH AUTHOR
  1580. XHoward Gayle,
  1581. XTN/ETX/T/BG,
  1582. XEricsson Telecom AB,
  1583. XS-126 25 Stockholm,
  1584. XSweden,
  1585. Xhoward@ericsson.se,
  1586. Xuunet!ericsson.se!howard,
  1587. XPhone: +46 8 719 5565,
  1588. XFAX: +46 8 719 9598,
  1589. XTelex: 14910 ERIC S
  1590. END_OF_FILE
  1591. if test 1769 -ne `wc -c <'usage.3'`; then
  1592.     echo shar: \"'usage.3'\" unpacked with wrong size!
  1593. fi
  1594. # end of 'usage.3'
  1595. fi
  1596. if test -f 'usage.c' -a "${1}" != "-c" ; then 
  1597.   echo shar: Will not clobber existing file \"'usage.c'\"
  1598. else
  1599. echo shar: Extracting \"'usage.c'\" \(1562 characters\)
  1600. sed "s/^X//" >'usage.c' <<'END_OF_FILE'
  1601. X/*
  1602. X * usage - write usage string on standard error and exit
  1603. X */
  1604. X
  1605. X#ifndef lint
  1606. Xstatic char _cpyrgt[] = "Copyright 1989 Howard Lee Gayle";
  1607. X#endif lint
  1608. X
  1609. X/*
  1610. X * This program is free software; you can redistribute it and/or modify
  1611. X * it under the terms of the GNU General Public License version 1,
  1612. X * as published by the Free Software Foundation.
  1613. X *
  1614. X * This program is distributed in the hope that it will be useful,
  1615. X * but WITHOUT ANY WARRANTY; without even the implied warranty of
  1616. X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  1617. X * GNU General Public License for more details.
  1618. X *
  1619. X * You should have received a copy of the GNU General Public License
  1620. X * along with this program; if not, write to the Free Software
  1621. X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  1622. X */
  1623. X
  1624. X#include <stdio.h>
  1625. X#include <howard/port.h>
  1626. X#include <howard/version.h>
  1627. X
  1628. XMODVER ("@(#)$Header: usage.c,v 1.6 89/08/14 09:18:44 howard Exp $");
  1629. X
  1630. X#include <howard/malf.h>
  1631. X#include <howard/usage.h>
  1632. X
  1633. XPUBLIC void usage()
  1634. X
  1635. X/* Function:
  1636. X *    Write a usage message on stderr.
  1637. X *    Exit with exit code 1.
  1638. X * Algorithm:
  1639. X *    If the global _progn is set up, write the program name from it.
  1640. X *    Then write the string to which the global _usage points.
  1641. X */
  1642. X{
  1643. Xextern bStrT _usage; /* Usage string.*/
  1644. X
  1645. XFPUTS ("Usage: ", stderr);
  1646. Xputspn();
  1647. XPUTC (' ', stderr);
  1648. XFPUTS ((cStrT) _usage, stderr);
  1649. XPUTC ('\n', stderr);
  1650. XFFLUSH (stderr);
  1651. Xexit (1);
  1652. X}
  1653. X
  1654. X#ifdef TEST
  1655. XMAINVER ("@(#)$Header: usage.c,v 1.6 89/08/14 09:18:44 howard Exp $");
  1656. XUSAGE ("[-a] [-b] {file}");
  1657. Xmain()
  1658. X{
  1659. Xusage();
  1660. X}
  1661. X#endif
  1662. END_OF_FILE
  1663. if test 1562 -ne `wc -c <'usage.c'`; then
  1664.     echo shar: \"'usage.c'\" unpacked with wrong size!
  1665. fi
  1666. # end of 'usage.c'
  1667. fi
  1668. if test -f 'userfn.3' -a "${1}" != "-c" ; then 
  1669.   echo shar: Will not clobber existing file \"'userfn.3'\"
  1670. else
  1671. echo shar: Extracting \"'userfn.3'\" \(1834 characters\)
  1672. sed "s/^X//" >'userfn.3' <<'END_OF_FILE'
  1673. X.\" $Header: userfn.3,v 1.1 89/08/20 11:39:55 howard Exp $
  1674. X.TH USERFN "3 -lhoward" "$Revision: 1.1 $" "Howard\'s C library" "Howard\'s C library"
  1675. X.SH NAME
  1676. Xuserfn \- copy full name of user
  1677. X.SH SYNOPSIS
  1678. X.nf
  1679. X.BR "#include <" stdio.h ">"
  1680. X.BR "#include <" howard/port.h ">"
  1681. X.BR "#include <" howard/malf.h ">"
  1682. X.fi
  1683. X.LP
  1684. XbStrT userfn (
  1685. X.IR buffer )
  1686. X.nf
  1687. X.RI "bStrT " buffer ;
  1688. X.fi
  1689. X.SH COPYRIGHT
  1690. XCopyright \(co 1989 Howard Lee Gayle
  1691. X.SH DESCRIPTION
  1692. X.I userfn
  1693. Xcopies into the area to which
  1694. X.I buffer
  1695. Xpoints the full (real) name of the user running the process
  1696. Xthat called it.
  1697. XIt first tries to get the user's login name with
  1698. X.IR getlogin (3),
  1699. Xthen gets the password entry with
  1700. X.IR getpwnam .
  1701. XIf that fails, it gets the password entry with
  1702. X.IR getpwuid .
  1703. XIn either case, it then calls
  1704. X.I getpwf
  1705. Xto get the full name.
  1706. X.SH RETURNS
  1707. XOn success, a pointer to the NUL in
  1708. X.I buffer
  1709. Xat the end of the copied full name.
  1710. XNULL if the full name is empty or there is no password entry.
  1711. X.SH "SEE ALSO"
  1712. X.IR getpwent (3),
  1713. X.IR getpwf "(3 \-lhoward)."
  1714. X.SH LICENSE
  1715. XThis program is free software; you can redistribute it and/or modify
  1716. Xit under the terms of the GNU General Public License version 1,
  1717. Xas published by the Free Software Foundation.
  1718. X.PP
  1719. XThis program is distributed in the hope that it will be useful,
  1720. Xbut WITHOUT ANY WARRANTY; without even the implied warranty of
  1721. XMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  1722. XGNU General Public License for more details.
  1723. X.PP
  1724. XYou should have received a copy of the GNU General Public License
  1725. Xalong with this program; if not, write to the Free Software
  1726. XFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  1727. X.SH AUTHOR
  1728. XHoward Gayle,
  1729. XTN/ETX/T/BG,
  1730. XEricsson Telecom AB,
  1731. XS-126 25 Stockholm,
  1732. XSweden,
  1733. Xhoward@ericsson.se,
  1734. Xuunet!ericsson.se!howard,
  1735. XPhone: +46 8 719 5565,
  1736. XFAX: +46 8 719 9598,
  1737. XTelex: 14910 ERIC S
  1738. END_OF_FILE
  1739. if test 1834 -ne `wc -c <'userfn.3'`; then
  1740.     echo shar: \"'userfn.3'\" unpacked with wrong size!
  1741. fi
  1742. # end of 'userfn.3'
  1743. fi
  1744. echo shar: End of archive 8 \(of 9\).
  1745. cp /dev/null ark8isdone
  1746. MISSING=""
  1747. for I in 1 2 3 4 5 6 7 8 9 ; do
  1748.     if test ! -f ark${I}isdone ; then
  1749.     MISSING="${MISSING} ${I}"
  1750.     fi
  1751. done
  1752. if test "${MISSING}" = "" ; then
  1753.     echo You have unpacked all 9 archives.
  1754.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1755. else
  1756.     echo You still need to unpack the following archives:
  1757.     echo "        " ${MISSING}
  1758. fi
  1759. ##  End of shell archive.
  1760. exit 0
  1761.  
  1762.